Virtualization abstracts and converts computer physical resources, such as a server, a network, a memory, and storage and presents them, so that a user may use these resources in a better manner than an original configuration. The new virtual part of these resources is not limited by architecture manners, localities or physical configurations of the original resources. Multiple virtual machines (VMs) operate on a host that physically exists. The host manages all physical hardware devices and resources, and virtualizes an exclusive device into multiple virtual devices for simultaneous use by multiple user threads. A device that each user is capable of seeing is a virtual device, and the physical hardware devices are transparent to the user.
In a virtual environment, a VM is not able to directly access a hardware device, and a host provides for the VM a data channel to connect to the hardware device, namely, an I/O channel. In the present invention, the channel includes a data channel between a VM front device and a VM back device, and a data channel between a VM back device and a host native device; where the VM front device is a device seen in the virtual machine, and is actually a device simulated by the host for the VM, the VM back device is a software simulation device connected to the VM front device in a host operating system, and the host native device is a host physical device.
FIG. 1 describes a simple multi-I/O channel technology on a virtual platform in the prior art, and two VMs, VM1 and VM2 are used as an example, where there are multiple I/O channels (two I/O channels are used as an example in FIG. 1) between a front device and a back device of a VM. A data processing module is a bridge between the front device and the back device of the VM, is used for data copying, data filtering or other data processing services, and includes multiple working threads (two working threads are used as an example in FIG. 1); the number of working threads is equal to the number of I/O channels between the VM front device and the VM back device, and each I/O channel corresponds to one working thread. A single channel exists between the VM back device and bridge, and between the bridge and the native device, and the VM back device transmits data to the native device through the single channel.
The foregoing prior art has at least the following technical problems: the number of I/O channels between a VM front device and a VM back device is determined when a VM is created, the number of I/O channels cannot be changed in a VM life cycle, and therefore, channel resources occupied by the I/O channels between the VM front device and the VM back device cannot be changed. When I/O throughput between the VM front device and the VM back device changes, I/O channel resources cannot be adjusted; when the I/O throughput decreases, idle I/O channel resources cannot be released, resulting in a waste of the I/O channel resources; when the I/O throughput increases, I/O channel resources cannot be increased, resulting in an inability to improve a data transmission capability of the I/O channels and degraded system performance.